package crp.core.security.app;

import crp.core.security.domain.services.PermissionSearcher;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;

@ApplicationScoped
public class PermissionService {
    private final Instance<PermissionSearcher> searcher;

    @Inject
    public PermissionService(Instance<PermissionSearcher> searcher) {
        this.searcher = searcher;
    }

    public PermissionSearcher searcher() {
        return searcher.get();
    }
}
